package com.sunni.entity.validator;

import lombok.Data;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.Min;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;

@Data
public class Student {
    @NotNull(message = "id不能为空")
    private Integer id;
    @NotEmpty(message = "name不能传入null")
    @Length(min = 3,message = "name长度最小为3")
    private String name;
    @Min(value = 16,message = "age最小为16")
    private Integer age;
}
